﻿@model PicStore.Web.Models.Picture.PictureModel
@{
    Layout = null;
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/Javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>


@using (Ajax.BeginForm((string) ViewBag.Action, "Picture", null, new AjaxOptions {HttpMethod = "Post", OnSuccess = (string) ViewBag.OnSuccess}, new {@class = "form-horizontal"}))
{
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h3>Picture Detail</h3>
    </div>

    @Html.ValidationSummary(true)
    @Html.HiddenFor(model => model.Id)
    <table>
        <tr>
            <td>
                @Html.LabelFor(model => model.PictureName, new {@class = "control-label"})
            </td>
            <td>@Html.DisplayFor(model => model.PictureName)</td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.CreaterName, new {@class = "control-label"})
            </td>
            <td>@Html.DisplayFor(model => model.CreaterName)</td>
        </tr>
        <tr>
            <td>@Html.LabelFor(model => model.Date, new {@class = "control-label"})</td>
            <td>@Html.DisplayFor(model => model.Date)</td>
            <td rowspan="11" style="width: 120px;">
                @{
                    var name = Model.PicturePath;
                    var imagePath = @Url.Content(name);
                }
                <img  style="width: 100px; height: 270px;" id="pictureUrl" src="@imagePath">
            </td>
        </tr>
        <tr>
            <td>@Html.LabelFor(model => model.Place, new {@class = "control-label"})</td>
            <td>@Html.DisplayFor(m => m.Place)<br/></td>
        </tr>
        <tr>
            <td>@Html.LabelFor(model => model.Sex, new {@class = "control-label"})</td>
            <td>@Html.DisplayFor(m => m.Sex)<br/></td>
        </tr>
        <tr>
            <td>@Html.LabelFor(model => model.Item, new {@class = "control-label"})</td>
            <td>@Html.DisplayFor(m => m.Item)<br/></td>
        </tr>
        <tr>
            <td>@Html.LabelFor(model => model.Color, new {@class = "control-label"})</td>
            <td>@Html.DisplayFor(m => m.Color)<br/></td>
        </tr>
        <tr>
            <td>@Html.LabelFor(model => model.Style, new {@class = "control-label"})</td>
            <td>@Html.DisplayFor(m => m.Style)<br/></td>
        </tr>
        <tr>
            <td>@Html.LabelFor(model => model.Length, new {@class = "control-label"})</td>
            <td>@Html.DisplayFor(m => m.Length)<br/></td>
        </tr>
        <tr>
            <td>@Html.LabelFor(model => model.Collar, new {@class = "control-label"})</td>
            <td>@Html.DisplayFor(m => m.Collar)<br/></td>
        </tr>
        <tr>
            <td>@Html.LabelFor(model => model.Front, new {@class = "control-label"})</td>
            <td>@Html.DisplayFor(m => m.Front)<br/></td>
        </tr>
        <tr>
            <td>@Html.LabelFor(model => model.Sleeve, new {@class = "control-label"})</td>
            <td>@Html.DisplayFor(m => m.Sleeve)<br/></td>
        </tr>
        <tr>
            <td>@Html.LabelFor(model => model.SweaterTexture, new {@class = "control-label"})</td>
            <td>@Html.DisplayFor(m => m.SweaterTexture)<br/></td>
        </tr>
        <tr>
            <td>@Html.LabelFor(model => model.Type, new {@class = "control-label"})</td>
            <td>@Html.DisplayFor(m => m.Type)<br/></td>
        </tr>
    </table>

    <div class="modal-footer">
        <a href="#" class="btn" data-dismiss="modal">Close</a>
    </div>
}
